﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Worms3003
{
    public class States
    {
        #region atributos
        public Texture2D textura;
        public Vector2 posicao;
        public int altura;
        public int largura;
        public SpriteFont fonte;
        string texto_estado;
        Vector2 posicao_fonte;
        Color cor;
        #endregion

        public Vector2 vector
        {
            get { return this.posicao; }
            set { this.posicao = value; }
        }

        public Texture2D texturas
        {
            get { return this.textura; }
            set { this.textura = value; }
        }

        public States(Texture2D texture, Vector2 position, int width, int height, SpriteFont font, string text, Vector2 positionFont, Color color)
        {
            #region construtor da classe
            textura = texture;
            posicao = position;
            largura = width;
            altura = height;
            fonte = font;
            texto_estado = text;
            posicao_fonte = positionFont;
            cor = color;
            #endregion
        }

        public States(Texture2D texture, Vector2 position, int width, int height, Color color)
        {
            #region construtor da classe
            textura = texture;
            posicao = position;
            largura = width;
            altura = height;
            cor = color;
            #endregion
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(textura, new Rectangle((int)posicao.X, (int)posicao.Y, largura, altura), Color.White);

            spriteBatch.DrawString(fonte, texto_estado, posicao_fonte, cor);
        }

        public void DrawScroll(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(textura, new Rectangle(0, 0, largura, altura), new Rectangle((int)posicao.X, (int)posicao.Y, largura, altura), Color.White);
        } 

        public void DrawScrollwithFont(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(textura, new Rectangle(0, 0, largura, altura), new Rectangle((int)posicao.X, (int)posicao.Y, largura, altura), Color.White);

            spriteBatch.DrawString(fonte, texto_estado, posicao_fonte, cor);
        }

    }
    
}